package org.scub.foundation.fournisseur.egicom.core.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import org.scub.foundation.framework.core.model.BaseModel;

/**
 * Entité persistante modélisant les comptes.
 * @author E-GICOM
 */
@Entity
@Table(name = "fournisseur")
public class Compte extends BaseModel {

    private static final long serialVersionUID = 1648642991406224637L;

    @Column(nullable = false)
    private String login;

    @Column(nullable = false)
    private String password;

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object other) {
        if (other == null || !(other instanceof Compte)) {
            return false;
        }
        return equalsUtil(other);
    }

    @Override
    public int hashCode() {
        return super.hashCode();
    }

    /**
     * Get the value of login.
     * @return the login
     */
    public String getLogin() {
        return login;
    }

    /**
     * Set the value of login.
     * @param login the login to set
     */
    public void setLogin(String login) {
        this.login = login;
    }

    /**
     * Get the value of password.
     * @return the password
     */
    public String getPassword() {
        return password;
    }

    /**
     * Set the value of password.
     * @param password the password to set
     */
    public void setPassword(String password) {
        this.password = password;
    }

}
